# -*- mode: makefile -*-
#

ifeq ($(RM),true)
.SECONDARY: $(%.o) $(%f.o) $(%f90.o)
endif

LINK.c = $(CLINKER) $(PCC_LINKER_FLAGS) $(CFLAGS) $(PETSC_CCPPFLAGS) $(CPPFLAGS) $(LDFLAGS)
LINK.F = $(FC_LINKER) $(FC_LINKER_FLAGS) $(FFLAGS) $(PETSC_FCPPFLAGS) $(CPPFLAGS) $(LDFLAGS)
LINK.cc = $(CXXLINKER) $(CXX_LINKER_FLAGS) $(CXXFLAGS) $(PETSC_CCPPFLAGS) $(CPPFLAGS) $(LDFLAGS)

LDLIBS += $(PETSC_LIB)

% : %.F90
	$(LINK.F) $^ $(LOADLIBES) $(LDLIBS) -o $@
% : %.cxx
	$(LINK.cc) $^ $(LOADLIBES) $(LDLIBS) -o $@

include ${PETSC_DIR}/lib/petsc/conf/test.common
